﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsForms
{
    public partial class FrmMain : Form
    {
        public FrmMain()
        {
            InitializeComponent();
        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void 社团管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmClubManage frm = new FrmClubManage();
            frm.MdiParent = this;
            frm.Show();
        }
        private void 社员管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmClubMemberManage frm = new FrmClubMemberManage();
            frm.MdiParent = this;
            frm.Show();
        }
        private void 退出ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("您真的要退出系统吗？", "系统提示",
                MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                Application.Exit();
            }
        }
        private void 活动管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmActivityManage frm = new FrmActivityManage();
            frm.MdiParent = this;
            frm.Show();
        }
        private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
        }

        private void toolStripbtnMember_Click(object sender, EventArgs e)
        {
            社员管理ToolStripMenuItem_Click(sender, e);
        }

        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            退出ToolStripMenuItem1_Click(sender,e);
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            活动管理ToolStripMenuItem_Click(sender,e);
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
            statusStriplblUserName.Text = "当前用户："+FrmLogin.uname;
            statusStriplblRole.Text = "用户权限："+FrmLogin.urole;
            stautsStriplblTime.Text = "系统当前时间：" + System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
        }

        private void 社员查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmClubMemberSearch frmcheck = new FrmClubMemberSearch();
            frmcheck.MdiParent = this;
            frmcheck.Show();
        }

        private void toolStripbtnMemberQuery_Click(object sender, EventArgs e)
        {
            社员查询ToolStripMenuItem_Click(sender, e);
        }

        private void 社团查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmClubSearch frmcheck = new FrmClubSearch();
            frmcheck.MdiParent = this;
            frmcheck.Show();
        }

        private void 活动查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmActivitySearch frmcheck = new FrmActivitySearch();
            frmcheck.MdiParent = this;
            frmcheck.Show();
        }

      
       

        

        

        private void 考勤管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmCheckAttendance frm = new FrmCheckAttendance();
            frm.MdiParent = this;
            frm.Show();
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            考勤管理ToolStripMenuItem_Click(sender, e);
        }

        private void 修改密码ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmpwdUpdate frm = new FrmpwdUpdate();
            frm.MdiParent = this;
            frm.Show();
        }

        private void 用户查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void 用户管理2ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmUserManage frm = new FrmUserManage();
            frm.MdiParent = this;
            frm.Show();
        }
    }
}
